package hotel.switchs.oversea.online.mapper;

import hotel.base.oversea.repository.MyMapper;
import hotel.switchs.oversea.api.entity.SwitchCreateBasicRoomEntity;
import org.apache.ibatis.annotations.Param;

/**
 * @Author lmf
 * @Date 2020/6/8 14:12
 **/
public interface SwitchCreateBasicRoomMapper extends MyMapper<SwitchCreateBasicRoomEntity> {
    /**
     * 根据子酒店id 子物理房型id 获取创建房型信息
     * @param hotelId
     * @param basicRoomId
     * @return
     */
    SwitchCreateBasicRoomEntity selectBasicRoomInfo(@Param("hotelId") int hotelId, @Param("basicRoomId") int basicRoomId);

    /**
     * <H1>获取子酒店ID和子物理房型ID，定时器调用</H1>
     *
     * @param
     * @return hotel.switchs.oversea.api.entity.SwitchCreateBasicRoomEntity
     * @author HuangT
     * @date 2020/7/14 14:57
    */
    SwitchCreateBasicRoomEntity getBasicRoomInfoForJob();

    /**
     * <H1>根据ID，更新状态</H1>
     *
     * @param updateEntity
     * @return void
     * @author HuangT
     * @date 2020/7/14 17:19
    */
    void updateCreateStateById(SwitchCreateBasicRoomEntity updateEntity);

    /**
     *
     * @author: lmf
     * @time: 2020/10/30 16:08
     *  根据子酒店id+母物理房型id
     */

    SwitchCreateBasicRoomEntity selectByHotelIdAndBasicIdA(@Param("childHotelId") int childHotelId, @Param("masterBasicRoomId") int masterBasicRoomId);

    /**
     * 根据子酒店id+母物理房型更新创建物理房型信息
     * @param hotelId
     * @param RoomId
     * @return
     */
    Integer updateByHotelIdAndMasterBasicRoomId(@Param("hotelId") Integer hotelId, @Param("RoomId") String RoomId);

    /**
     * 根据创建子物理房型
     * @param basicRoomTypeId
     * @return
     */
    Integer updateCreateStateByBasicRoomTypeId(@Param("basicRoomTypeId") Integer basicRoomTypeId);
    /***
    * @Author: lmf
    * @Date: 2020/12/17
     * 每日更新一下房态和价格
    */
    Integer updateCreateStateBasicRoomByToday();

    /**
     *
     * @author: lmf
     * @time: 2020/10/30 16:08
     *  根据子酒店id+母物理房型id 更新状态
     */
    Integer updateBasicCreateStateByHotelIdAndBasicIdA(@Param("childHotelId") int childHotelId, @Param("masterBasicRoomId") int masterBasicRoomId);
    /***
    * @Author: lmf
    * @Date: 2021/1/4
     * 批量更新物理房型的创建状态
    */
    Integer updateBatchCreateState(@Param("ids") String ids);
    /***
    * @Author: lmf
    * @Date: 2021/1/13
     * 获取有订单的酒店的房型id进行创建
    */
    SwitchCreateBasicRoomEntity getOrderBasicInfoForJob();
    /***
    * @Author: lmf
    * @Date: 2021/1/13
     * 优先创建没有产品的房型
    */
    SwitchCreateBasicRoomEntity getNoGoodBasicInfoForjob();
}
